1. Field of the Invention
The present invention relates to a method and an apparatus for extracting a representative color which represents visual impression of an image.
2. Description of the Related Arts
Recently, digital cameras and camera phones are becoming popular, and users are becoming to serve captured images in a personal computer at home, apply image processing such as color correction and image quality correction to the images, and order prints through the Internet. For accommodating such user's needs, various techniques for easy search of images by sorting and organizing enormous number of images are developed. Especially, a technique in which a representative color representing visual impression of an image is used as an index for sorting and organizing images has been known (see Japanese Patent Laid-Open Publications No. 10-289242 and No. 2003-216948).
The Japanese Patent Laid-Open Publication No. 10-289242 detects an area where hue changes most in an image (high-visibility area for human) and extracts a representative color based on the detected area (called as the local representative color extraction processing). When the representative color is not extracted with the local representative color extraction processing, the representative color is extracted based on a frequency of hue of a full screen (called as the global representative color extraction processing). When the representative color is not extracted with the local representative color extraction processing, the global representative color extraction processing is not performed. Then a sensitivity vector that shows the correspondence relation between the image and an impression word corresponding to coloration is calculated based on the color difference between the representative color and the coloration that is preliminarily prepared, and the calculation result is stored.
To generate a histogram compatible with human color sense for extracting a representative color, the Japanese Patent Laid-Open Publication No. 2003-216948 divides an HSV color space into a plurality of areas in saturation direction, reducing the division number in value direction for an area with large saturation and increasing the division number in hue direction (since human is insensitive to color change caused by value change, and sensitive to hue change in this area), while increasing the division number in the value direction for an area with small saturation and reducing the division number in the hue direction (since human is sensitive to color change caused by value change, and insensitive to hue change in this area). By using such histogram, areas where human is sensitive to color difference can be more precisely analyzed.
However, in the Japanese Patent Laid-Open Publication No. 10-289242, when whether the local representative color extraction processing or the global representative color extraction processing extracts the representative color, the other is not performed. Accordingly, it is possible to extract an inappropriate color as the representative color. In addition, it will take a long time to constantly perform both of the local representative color extraction processing and the global representative color extraction processing, for solving this problem.
In the Japanese Patent Laid-Open Publication No. 2003-216948, colors to which human is insensitive to color difference (similar colors) are not extracted as the representative colors. However, there may be a case that similar colors are suitable as the representative colors. Accordingly, it is possible to extract inappropriate colors as the representative colors.